package com.laycoding.consumer.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * created with IntelliJ IDEA.
 *
 * @author: guidada
 * @date: 2021/05/12/10:19
 * @description:
 */
@Configuration
public class RestTemplateConfiguration {

    @Bean("restTemplate")
    @LoadBalanced
    public RestTemplate restTemplate(){
        return  new RestTemplate();
    }
}
